package day01;

/**
 * @author Jetwang
 * @version 1.0
 * @since 2023/3/18 16:50
 */
public class PriorityQueue03Test {
    public static void main(String[] args) {
        PriorityQueue03<Entry> queue03 = new PriorityQueue03<>(5);

        queue03.offer(new Entry("task01", 4));
        queue03.offer(new Entry("task02", 3));
        queue03.offer(new Entry("task03", 2));
        queue03.offer(new Entry("task04", 5));
        queue03.offer(new Entry("task05", 1));

        queue03.forEach(System.out::println);

        System.out.println("==========");

        System.out.println(queue03.poll().priority);
        System.out.println(queue03.poll().priority);
        System.out.println(queue03.poll().priority);
        System.out.println(queue03.poll().priority);
        System.out.println(queue03.poll().priority);
    }
}
